<template>
<div class="container">
  <!-- 头部区域 -->
  <header>
    <Header/>
  </header>
  <!-- 内容主体 -->
  <section class="content">
    <Content/>
  </section>
</div>

</template>

<script setup>
import Header from '@/views/Header.vue'
import Content from '@/views/Content.vue'
import { onBeforeMount, onMounted } from "vue-demi";
import { useUserStore } from "../store/userStore.js";

const userStore = useUserStore()


onBeforeMount(() => {
  // 每次dom更新完将本地的用户信息保存到仓库
  const user = JSON.parse(window.localStorage.getItem('user'))
  userStore.setUser(user)
})
</script>

<style lang="less" scoped>
.container {
  width: 100%;
  // height: 661px;
  height: 100%;
  overflow: hidden;
}
.content {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

</style>